﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Tracking.aspx.cs" Inherits="WMS6.Web.TransportManagement.Tracking"
    meta:resourcekey="Page" %>

<%@ Register Src="../UserControls/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Tracking</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" id="js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/Verification.js" type="text/javascript"></script>

    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>

    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initEditNewPage();
        }
        
        function newTracking()
        {
            var from = document.getElementById("hdnFrom").value;
            window.location.href = "Tracking.aspx?from=" + escape(from);
            return false;
        }
        
        //弹出窗口选择提货地址
        function selectBolDetail()
        {
            var rtnValue = popModalWindow('../TransportManagement/BolDetailQuery.aspx?action=txtBolID','dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById("txtBolID").focus();
                document.getElementById("txtBolID").value = rtnValue;
                __doPostBack("txtBolID_TextChanged","");
            }
        }
        
        
         function confirmMsg(code)
        {
            if(code == "C001")
            {
                if(confirm('<%=GetGlobalMsgResource("C001") %>'))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }
        
    </script>

</head>
<body>
    <form id="F8041" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblOwner" runat="server" CssClass="label_header" Text="在途跟踪" meta:resourcekey="lblOwner"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnGoBack" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnGoBack%>"
                            Enabled="False" CausesValidation="False" OnClick="btnGoBack_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnNew" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnNew%>"
                            Enabled="False" AccessKey="n" OnClientClick="newTracking();return false;" />
                    </td>
                    <td>
                        <asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSave%>"
                            Enabled="False" AccessKey="s" OnClick="btnSave_Click" />
                    </td>
                    <%--<td>
                        <asp:Button ID="btnDelete" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnDelete%>"
                            Enabled="False" AccessKey="d" OnClientClick="javascript:if(confirmMsg('C001')) return true; else return false;"
                            OnClick="btnDelete_Click" />
                    </td>--%>
                </tr>
            </table>
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div>
                    <asp:Label ID="lblMsg" runat="server" CssClass="label_message" meta:resourcekey="lblMsg"></asp:Label>
                </div>
                <div id="div_menu">
                    <div style="float: left; width: 8px;">
                        <div class="tabL" id="divL1">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur" onclick="setTab('one',1,2)"
                        id="divM1">
                        <asp:Label ID="one1" CssClass="hover" runat="server" meta:resourcekey="one1">常规</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR" id="divR1">
                        </div>
                    </div>
                    <div style="float: left; width: 8px;">
                        <div class="tabL_1" id="divL2">
                        </div>
                    </div>
                    <div style="float: left;" class="tabLabelCont tabCur_1" onclick="setTab('one',2,2);"
                        id="divM2">
                        <asp:Label ID="one2" CssClass="navigationlabel" runat="server" meta:resourcekey="one2">&nbsp;自定义&nbsp;</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR_1" id="divR2">
                        </div>
                    </div>
                </div>
                <div id="div_content">
                    <div id="con_one_1" style="display: block;">
                        <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td>
                                    <asp:Label ID="lblBolID" runat="server" CssClass="label" Text="装车单号" meta:resourcekey="lblBolID"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblDeliveryOrderID" runat="server" CssClass="label" Text="运单号" meta:resourcekey="lblDeliveryOrderID"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblCarrierID" runat="server" CssClass="label" Text="承运商" meta:resourcekey="lblCarrierID"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblEquipmentLicence" runat="server" CssClass="label" Text="车牌号" meta:resourcekey="lblEquipmentLicence"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtBolID" runat="server" CssClass="textbox" AutoPostBack="True"
                                        OnTextChanged="txtBolID_TextChanged" meta:resourcekey="txtBolID"></asp:TextBox>
                                    <img src="../Images/icon_find.gif" alt="select one item" class="img" onclick="selectBolDetail();" />
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDeliveryOrderID" runat="server" CssClass="textbox" meta:resourcekey="txtDeliveryOrderID"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtCarrierID" runat="server" CssClass="textbox" meta:resourcekey="txtCarrierID"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtEquipmentLicence" runat="server" CssClass="textbox" meta:resourcekey="txtEquipmentLicence"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblDriver" runat="server" CssClass="label" Text="司机" meta:resourcekey="lblDriver"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblDriverPhone" runat="server" CssClass="label" Text="司机电话" meta:resourcekey="lblDriverPhone"></asp:Label>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtDriver" runat="server" CssClass="textbox" meta:resourcekey="txtDriver"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDriverPhone" runat="server" CssClass="textbox" onblur="Javascript:dataVer._IsMobile(this,'lblMsg')"
                                        meta:resourcekey="txtDriverPhone"></asp:TextBox>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblTrackDate" runat="server" CssClass="label" Text="受理日期" meta:resourcekey="lblTrackDate"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblAccpectMode" runat="server" CssClass="label" Text="受理方式" meta:resourcekey="lblAccpectMode"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblTrackLoc" runat="server" CssClass="label" Text="跟踪地点" meta:resourcekey="lblTrackLoc"></asp:Label>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtTrackDate" runat="server" CssClass="textbox" onblur="Javascript:dataVer._IsTime(this,'lblMsg')"
                                        meta:resourcekey="txtTrackDate"></asp:TextBox></asp:TextBox><img src="../Images/calendar.gif"
                                            class="img" alt="请选择日期" onclick="setday(this,txtTrackDate)" />
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlAccpectMode" runat="server" CssClass="mediumselectbox" meta:resourcekey="ddlAccpectMode">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtTrackLoc" runat="server" CssClass="textbox" meta:resourcekey="txtTrackLoc"></asp:TextBox>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblRoadInfo" runat="server" CssClass="label" Text="路况信息" meta:resourcekey="lblRoadInfo"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblRemark" runat="server" CssClass="label" Text="备注" meta:resourcekey="lblRemark"></asp:Label>
                                </td>
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtRoadInfo" runat="server" CssClass="textbox" meta:resourcekey="txtRoadInfo"></asp:TextBox>
                                </td>
                                <td colspan="2">
                                    <asp:TextBox ID="txtRemark" runat="server" CssClass="largetextbox" meta:resourcekey="txtRemark"></asp:TextBox>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="con_one_2" style="display: none;">
                        <table width="360px" style="display: block; margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td>
                                    <asp:Label ID="lblUdf1" runat="server" CssClass="label" Text="自定义字段1" meta:resourcekey="lblUdf1"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblUdf2" runat="server" CssClass="label" Text="自定义字段2" meta:resourcekey="lblUdf2"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtUdf1" runat="server" CssClass="textbox" meta:resourcekey="txtUdf1"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtUdf2" runat="server" CssClass="textbox" meta:resourcekey="txtUdf2"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblUdf3" runat="server" CssClass="label" Text="自定义字段3" meta:resourcekey="lblUdf3"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblUdf4" runat="server" CssClass="label" Text="自定义字段4" meta:resourcekey="lblUdf4"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtUdf3" runat="server" CssClass="textbox" meta:resourcekey="txtUdf3"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtUdf4" runat="server" CssClass="textbox" meta:resourcekey="txtUdf4"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblUdf5" runat="server" CssClass="label" Text="自定义字段5" meta:resourcekey="lblUdf5"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblUdf6" runat="server" CssClass="label" Text="自定义字段6" meta:resourcekey="lblUdf6"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtUdf5" runat="server" CssClass="textbox" meta:resourcekey="txtUdf5"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtUdf6" runat="server" CssClass="textbox" meta:resourcekey="txtUdf6"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblUdf7" runat="server" CssClass="label" Text="自定义字段7" meta:resourcekey="lblUdf7"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblUdf8" runat="server" CssClass="label" Text="自定义字段8" meta:resourcekey="lblUdf8"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtUdf7" runat="server" CssClass="textbox" meta:resourcekey="txtUdf7"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtUdf8" runat="server" CssClass="textbox" meta:resourcekey="txtUdf8"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblUdf9" runat="server" CssClass="label" Text="自定义字段9" meta:resourcekey="lblUdf9"></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="lblUdf10" runat="server" CssClass="label" Text="自定义字段10" meta:resourcekey="lblUdf10"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtUdf9" runat="server" CssClass="textbox" meta:resourcekey="txtUdf9"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtUdf10" runat="server" CssClass="textbox" meta:resourcekey="txtUdf10"></asp:TextBox>
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div id="div_content2" style="margin-top: 10px;">
                    <div id="Div1" style="display: block;">
                        <table width="720px" style="display: block; margin-left: 10px; margin-top: 10px;">
                            <%--<tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Button ID="btnAddDetail" runat="server" CssClass="button" Enabled="false" Text="<%$ Resources:ButtonResource,btnAddDetail %>"
                                                    OnClick="btnAddDetail_Click" />
                                            </td>
                                            <td>
                                                <asp:Button ID="btnDeleteDetail" runat="server" CssClass="button" Enabled="false"
                                                    Text="<%$ Resources:ButtonResource,btnDeleteDetail %>" OnClick="btnDeleteDetail_Click" />
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>--%>
                            <tr>
                                <td>
                                    <div style="margin-top: 10px;">
                                        <asp:GridView ID="gvTrackingDetail" runat="server" AutoGenerateColumns="False" CssClass="gridview"
                                            DataKeyNames="BOL_ID" PageSize="20" OnInit="gvTrackingDetail_Init" AllowSorting="True"
                                            OnRowDataBound="gvTrackingDetail_RowDataBound" OnSorting="gvTrackingDetail_Sorting" Width="1100"
                                            meta:resourcekey="gvTrackingDetail">
                                            <FooterStyle CssClass="GridViewFooterStyle" />
                                            <RowStyle CssClass="GridViewRowStyle" />
                                            <HeaderStyle CssClass="GridViewHeaderStyle" />
                                            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                            <Columns>
                                                <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="BoundField">
                                                    <ItemStyle CssClass="GridViewRowWidth_40" />
                                                </asp:BoundField>
                                                <asp:TemplateField meta:resourcekey="TemplateField">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvTrackingDetail');"
                                                            meta:resourcekey="CheckBox1" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chbSelect" runat="server" meta:resourceKey="chbSelect" />
                                                    </ItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvTrackingDetail');"
                                                            meta:resourceKey="CheckBox2" />
                                                    </FooterTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                    <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="TRACKING_ID" HeaderText="跟踪号" FooterText="跟踪号" SortExpression="TRACKING_ID"
                                                    meta:resourcekey="TRACKING_ID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="BOL_ID" HeaderText="装车单号" FooterText="装车单号" SortExpression="BOL_ID"
                                                    meta:resourcekey="BOL_ID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="CUSTOMER_ID" HeaderText="客户代码" FooterText="客户代码" SortExpression="CUSTOMER_ID"
                                                    meta:resourcekey="CUSTOMER_ID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:TemplateField FooterText="受理日期" HeaderText="受理日期" SortExpression="TRACKING_DATE"
                                                    meta:resourcekey="TRACKING_DATE">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblTrackingDate" runat="server" Text='<%# GetPreferenceShortDate(Eval("TRACKING_DATE").ToString()) %>'
                                                            meta:resourcekey="lblTrackingDate"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="ACCEPT_MODE" HeaderText="受理方式" FooterText="受理方式" SortExpression="ACCEPT_MODE"
                                                    meta:resourcekey="ACCEPT_MODE">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="TRACKING_LOC" HeaderText="跟踪地点" FooterText="跟踪地点" SortExpression="TRACKING_LOC"
                                                    meta:resourcekey="TRACKING_LOC">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="ROAD_INFO" HeaderText="路况信息" FooterText="路况信息" SortExpression="ROAD_INFO"
                                                    meta:resourcekey="ROAD_INFO">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="REMARK" HeaderText="备注" FooterText="备注" SortExpression="REMARK"
                                                    meta:resourcekey="REMARK">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="CARRIER_ID" HeaderText="承运商" FooterText="承运商" SortExpression="CARRIER_ID"
                                                    meta:resourcekey="CARRIER_ID">
                                                    <ItemStyle CssClass="GridViewRowWidth_150" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="EQUIPMENT_LICENCE" HeaderText="车牌号" FooterText="车牌号"
                                                    SortExpression="EQUIPMENT_LICENCE" meta:resourcekey="EQUIPMENT_LICENCE">
                                                    <ItemStyle CssClass="GridViewRowWidth_150" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="DRIVER_ID" HeaderText="司机" FooterText="司机" SortExpression="DRIVER_ID"
                                                    meta:resourcekey="DRIVER_ID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                        <%--<div id="div_pager">
                                        <uc1:Pager ID="PagerFooter" runat="server" OnFirst="btnFirst_Click" OnPrevious="btnPrevious_Click"
                                            OnNext="btnNext_Click" OnLast="btnLast_Click" OnGoTo="GoTo_Click" />
                                        </div>--%>
                                    </div>
                                </td>
                            </tr>
                            <tr style="height: 30px;">
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <input type="hidden" id="hdnFrom" runat="server" />
        <input type="hidden" id="hdnActionID" runat="server" />
        <input type="hidden" id="hdnDataFormat" runat="server" />
        <input type="hidden" id="hdncalendarFlag" runat="server" />
    </div>
    </form>
</body>
</html>

<script language="javascript" type="text/javascript" event="onclick" for="document">
		<!--
		    hiddenCalendarDiv();
		//-->
</script>

